package iris_plugin

//
//import (
//	ctx "context"
//	"gitee.com/kristas/booting-go/framework/web"
//	"github.com/kataras/iris/v12/context"
//	"mime/multipart"
//	"net/http"
//)
//
//type mapperAdapter struct {
//	c context.Context
//}
//
//func (r *mapperAdapter) GetStringFromPath(name string) (string, error) {
//	return r.c.Params().GetString(name), nil
//}
//
//func (r *mapperAdapter) GetStringFromQuery(name string) (string, error) {
//	return r.c.URLParam(name), nil
//}
//
//func (r *mapperAdapter) GetStringFromHeader(name string) (string, error) {
//	return r.c.GetHeader(name), nil
//}
//
//func (r *mapperAdapter) GetStringFromForm(name string) (string, error) {
//	return r.c.PostValue(name), nil
//}
//
//func (r *mapperAdapter) GetMapFromForm() (map[string][]string, error) {
//	return r.c.FormValues(), nil
//}
//
//func (r *mapperAdapter) GetMultipartHeader(param web.Param) (*multipart.FileHeader, error) {
//	_, header, err := r.c.FormFile(param.GetName())
//	return header, err
//}
//
//func (r *mapperAdapter) GetRequest() (*http.Request, error) {
//	return r.c.Request(), nil
//}
//
//func (r *mapperAdapter) GetResponseWriter() (http.ResponseWriter, error) {
//	return r.c.ResponseWriter(), nil
//}
//
//func (r *mapperAdapter) GetContext() (ctx.Context, error) {
//	req, _ := r.GetRequest()
//	return req.Context(), nil
//}
//
//func (r *mapperAdapter) Get(param web.Param) (interface{}, error) {
//	return map[string]interface{}{
//		"ctx": r.c,
//	}[param.GetSource()], nil
//}
//
//func NewMapperAdapter(c context.Context) web.ParamMapper {
//	return &mapperAdapter{c: c}
//}
